1. Field of the Invention
The present invention relates generally to methods for optimizing performance of distributed applications. More particularly, the present invention relates to a method for optimizing performance of a distributed application by dynamic usage pattern learning.
2. Background Art
Many distributed applications use object caches of some kind to reduce data roundtrips between the client and the server. In order for the object caching to be beneficial, the caching policy, i.e., which objects are replaced when the cache is full, which are objects are pre-fetched into the cache, and what object attributes are pre-fetched, must be efficient. It is common to find excessive amounts of data being transferred over the network and cached on the client because of overzealous data pre-fetching in false anticipation of future usage of the data. For example, if a Business Manager object has a list of immediate reports as an attribute and the naïve pre-fetching algorithm gets them all along with the Manager object, and does the same for each report. Then if there is a request for data on the CEO of a large corporation, naïve pre-fetching will result in attempting to cache every employee's profile. It is also common to find excessive number of data roundtrips between the client and the server because of indiscriminate use of fine-grained remote objects. The amount of data transferred and the number of data roundtrips between the client and the server may be reduced if pre-fetching is based on data usage patterns, since many distributed applications follow a small number of data usage patterns (relative to the amount of the data itself) repeated over many times. For example, data usage patterns in most enterprise applications are determined by business logic rules and data relationships, which are typically very small in comparison to the amount of the application data.
One of the main challenges facing many enterprises is how to enable their legacy applications to make use of more efficient techniques, such as object pre-fetching based on dynamic usage pattern learning, without having to redesign the applications or while migrating to a new architecture. Many legacy applications are designed without intent or means to facilitate learning of data usage patterns. Further, there is limited or no means for application source static analysis and re-architecture due to legal restrictions on accessing the application source code and/or the application relying on third party libraries and complex interactions with the distributed environment. Nevertheless, the effect of pre-fetching objects and attributes based on dynamic usage pattern learning can be quite beneficial to the performance of the application. Therefore, what is desired is a method for learning usage patterns dynamically in distributed applications designed without intent or means to facilitate learning of data usage patterns.